<script setup>
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import PlatFormSideMenu from '@/views/PlatForm/components/PlatFormSideMenu.vue'

const router = useRouter();

function goUploadPage(){
  router.push({name:'platform.upload'})
}

</script>

<template>
<div class="platform">
  <div class="platform-header">
    <div class="logo">
      Fan 创作中心
    </div>
  </div>
  <div class="platform-root">
    <div class="platform-root-navMenu">
      <div class="upload-work-section">
        <a class="upload-work-btn" @click="goUploadPage">投稿</a>
      </div>
      <PlatFormSideMenu></PlatFormSideMenu>
    </div>
    <div class="platform-root-body">
      <RouterView></RouterView>
    </div>
  </div>
</div>
</template>

<style lang="less" scoped>
.platform {
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  overflow:hidden;
  background-color: white;
  color: black;

  &-header{
    height: 60px;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    padding: 0 100px 0 32px;
    box-sizing: border-box;
    background: #fff;
    box-shadow: 0 2px 10px 0 rgba(0, 0, 0, .05);
    margin-right: calc(-100vw + 100%);
    user-select: none;

    .logo{
      font-size: 26px;
      color: #00a1d6;
      cursor: pointer;
      font-weight: 800;
    }
  }

  &-root{
    box-sizing: border-box;
    height: 100%;

    &-navMenu{
      margin-top: 60px;
      width: 200px;
      border-right: 1px solid #f4f4f4;
      position: fixed;
      -webkit-transform: translateZ(0);
      transform: translateZ(0);
      top: 0;
      left: 0;
      border-right: 1px solid #e5e9ef;
      background: #fff;
      z-index: 10;
      height: 100%;
      overflow: hidden;
      font-family: PingFangSC-Regular, Microsoft YaHei, Arial, Helvetica, sans-serif;

      .upload-work-section{
        width: 100%;
        height: 82px;
        display: flex;
        justify-content: center;
        align-items: center;

        .upload-work-btn{
          display: block;
          font-size: 16px;
          color: #fff;
          text-align: center;
          line-height: 40px;
          border-radius: 4px;
          background: #00a1d6;
          cursor: pointer;
          width: 136px;
        }
      }

    }

    &-body{
      padding: 0;
      background: #fafafa;
      margin-left: 200px;
      min-width: 800px;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      flex-direction: column;
      height: calc(100vh - 60px);
      overflow-y: scroll;
    }
  }

}
</style>
